package cn.com.lms.business.core.util;

import cn.com.lms.business.user.persistence.entity.SysUserVo;

/*
 * @author liuwei
 * @date 2020/3/21 14:38
 * @desc 获取当前用户信息
 */
public  final class CurrentUserInstance {

    private static ThreadLocal<SysUserVo> currentUser = new ThreadLocal<>();
    private CurrentUserInstance() {
    }

    public static SysUserVo getCurrentUser(){
        return currentUser.get();
    }

    public static void setCurrentUser(SysUserVo sysUser){
        currentUser.set(sysUser);
    }

}

